package server;

import java.io.ObjectInputStream;
import java.net.Socket;
import java.util.Observable;

public class ReceiverConnection extends Observable implements Runnable{
	private Socket socket;
	private ObjectInputStream in;
	private Object input;
	public ReceiverConnection(Socket socket){
		this.socket = socket;
		
	}
	
	public Object getInput(){
		return input;
	}
	
	
	public void run(){
		try{
			in = new ObjectInputStream(socket.getInputStream());
			while(true){
				Object input= in.readObject();
				setChanged();
				notifyObservers();
				
				
				
			}
		}
		catch(Exception e){
			
		}
	}	
	
}
